import request from '@/utils/request'

const modelUrl = '/admin-users/'

export function fetchList(query) {
  return request({
    url: modelUrl + 'list',
    method: 'get',
    params: query
  })
}

export function createModel(data) {
  return request({
    url: modelUrl + 'create',
    method: 'post',
    data
  })
}

export function updateModel(data) {
  return request({
    url: modelUrl + 'update',
    method: 'post',
    data
  })
}

export function deleteModel(data) {
  return request({
    url: modelUrl + 'delete',
    method: 'post',
    data
  })
}